<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link rel="stylesheet"
	href="${pageContext.request.contextPath}/css/addQuestion.css">

<script src="${pageContext.request.contextPath}/js/jquery.min.js"></script>
<script src="${pageContext.request.contextPath}/js/addQuestion.js"></script>
<script>
	function add() {
		var title = document.getElementsByName("title");
		var titleArray = document.getElementsByClassName("btwenzi");
		var optionArray = document.getElementsByName("choose");
		var content = document.getElementsByClassName("option");
		var numsArray = document.getElementsByClassName("wjdc_list");
		var nums = document.getElementsByName("nums");
		for (var i = 0; i < titleArray.length; i++) {
			title[i].value = titleArray[i].innerHTML;
		}
		for (var i = 0; i < optionArray.length; i++) {
			content[i].value = optionArray[i].innerHTML;
		}
		for (var i = 0; i < numsArray.length; i++) {
			nums[i].value = numsArray[i].children.length - 2;
		}
	}
</script>
</head>
<body>
	<form method="post"
		action="${pageContext.request.contextPath}/addQuestion.do">
		<div class=" all_660">
			问卷标题：<input type="text" name="surveyTitle" /> 问卷编号：<input
				type="text" name="surveyId" />
			<div class="yd_box"></div>
			<div class="but" style="padding-top: 20px">
				<select id="addquerstions" class="addquerstions" name="">
					<option value="-1">添加问题</option>
					<option value="0">单选</option>
					<option value="1">多选</option>
					<option value="2">填空</option>
				</select> <input type="hidden" value=""> <input type="submit"
					value="提交问卷" onClick="add()">
			</div>
			<!--选项卡区域  模板区域---------------------------------------------------------------------------------------------------------------------------------------->
			<div class="xxk_box">
				<div class="xxk_conn hide">
					<!--单选----------------------------------------------------------------------------------------------------------------------------------------->
					<div class="xxk_xzqh_box dxuan ">
						<textarea name="" cols="" rows=""
							class="input_wenbk btwen_text btwen_text_dx" placeholder="单选题目"></textarea>
						<div class="title_itram">
							<div class="kzjxx_iteam">
								<input name="" type="radio" value="" class="dxk"> <input
									name="" type="text" class="input_wenbk" value=""
									placeholder="选项"> <label> <input name=""
									type="checkbox" value="" class="fxk"> <span>可填空</span>
								</label> <a href="javascript:void(0);" class="del_xm">删除</a>
							</div>
						</div>
						<a href="javascript:void(0)" class="zjxx">增加选项</a>
						<!--完成编辑-->
						<div class="bjqxwc_box">
							<a href="javascript:void(0);" class="qxbj_but">取消编辑</a> <a
								href="javascript:void(0);" class="swcbj_but"> 完成编辑</a>
						</div>
					</div>
					<!--多选----------------------------------------------------------------------------------------------------------------------------------------->
					<div class="xxk_xzqh_box duoxuan hide">
						<textarea name="" cols="" rows=""
							class="input_wenbk btwen_text btwen_text_duox" placeholder="多选题目"></textarea>
						<div class="title_itram">
							<div class="kzjxx_iteam">
								<input name="" type="checkbox" value="" class="dxk"> <input
									name="" type="text" class="input_wenbk" value="选项"
									placeholder="选项"> <label> <input name=""
									type="checkbox" value="" class="fxk"> <span>可填空</span></label>
								<a href="javascript:void(0);" class="del_xm">删除</a>
							</div>
						</div>
						<a href="javascript:void(0)" class="zjxx">增加选项</a>
						<!--完成编辑-->
						<div class="bjqxwc_box">
							<a href="javascript:void(0);" class="qxbj_but">取消编辑</a> <a
								href="javascript:void(0);" class="swcbj_but"> 完成编辑</a>
						</div>
					</div>
					<!-- 填空----------------------------------------------------------------------------------------------------------------------------------------->
					<div class="xxk_xzqh_box tktm hide">
						<textarea name="" cols="" rows=""
							class="input_wenbk btwen_text btwen_text_tk" placeholder="答题区"></textarea>
						<!--完成编辑-->
						<div class="bjqxwc_box">
							<a href="javascript:void(0);" class="qxbj_but">取消编辑</a> <a
								href="javascript:void(0);" class="swcbj_but"> 完成编辑</a>
						</div>
					</div>
				</div>
			</div>
		</div>
	</form>
</body>
</html>